<template>
	<div @click="Onclick">
		<div>
			<img :src="index == selectindex?imgred:img">
		</div>
		<div>{{title}}</div>
	</div>
</template>

<script>
	export default {
		props:{
			item : {
				type : Object
			},
			index : {
				type : Number
			},
			selectindex : {
				type : Number
			}
		},
		data(){
			return {
			 title : this.item.title,
			 img : this.item.img,
			 imgred : this.item.imgred
			}
		},
		methods:{
			Onclick(){
				this.$router.push(this.item.path);
				this.$emit("changeindex",this.index)
			}
		}
	}
</script>

<style scoped>
	img
	{
		
	}
</style>
